package game.core.phases 
{
	/**
	 * ...
	 * @author Sulus Ltd.
	 */
	public class ControlBuildingPhase extends TurnPhase
	{
		
		public function ControlBuildingPhase() 
		{
			name = "управление башней";
		}
		
		
		override public function Start():void 
		{
			trace("ControlBuildingPhase phase begins");
			
			if (!papa.currentPlayer && !papa.currentPlayer.currentBuilding) 
			{
				EndPhase();
				return;
			}
			
			papa.currentPlayer.currentBuilding.SetControlled(true);
			
		}
		
		override public function Finish():void 
		{
			papa.currentPlayer.currentBuilding.SetControlled(false);
			trace("ControlBuildingPhase phase ends");
		}

	}

}